import { ActionType } from "../../../public/Config";
import BlinkEyeAction from "./BlinkEye";
import Jump from "./Jump";
import ChangeFace from "./ChangeFace";
import ShakeHead from "./ShakeHead";
import ChangeLevel from "./ChangeLevel";
import SleepAction from "./SleepAction";
import AwakeAction from "./AwakeAction";
import ShowLeg from "./ShowLeg";
import EatingAction from "./EatingAction";

export default class ActionFactory {

    static builder(type: ActionType) {
        let action = null;
        switch (type) {
            case ActionType.BLINK_EYE:
                action = new BlinkEyeAction()
                break;
            case ActionType.JUMP:
                action = new Jump()
                break;
            case ActionType.CHANGE_FACE:
                action = new ChangeFace()
                break;
            case ActionType.SHAKE_HEAD:
                action = new ShakeHead()
                break;
            case ActionType.CHANGE_LEVEL:
                action = new ChangeLevel()
                break;
            case ActionType.SLEEP:
                action = new SleepAction()
                break;
            case ActionType.AWAKE:
                action = new AwakeAction()
                break;
            case ActionType.SHOW_LEG:
                action = new ShowLeg()
                break;
            case ActionType.EATING:
                action = new EatingAction()
                break;
        }
        return action;
    }
}
